#include <filesystem>
#include <iostream>

namespace fs = std::filesystem;

/*

path() noexcept;                                                                        (1)	(C++17 起)
path( const path& p );                                                                  (2)	(C++17 起)
path( path&& p ) noexcept;                                                              (3)	(C++17 起)
path( string_type&& source, format fmt = auto_format );                                 (4)	(C++17 起)
template< class Source >
path( const Source& source, format fmt = auto_format );                                 (5)	(C++17 起)
template< class InputIt >
path( InputIt first, InputIt last, format fmt = auto_format );                          (6)	(C++17 起)
template< class Source >
path( const Source& source, const std::locale& loc, format fmt = auto_format );         (7)	(C++17 起)
template< class InputIt >
path( InputIt first, InputIt last, const std::locale& loc, format fmt = auto_format );  (8)	(C++17 起)

*/
void from_construct() {
    // 1
    fs::path p1;
    std::cout << "1. " << p1 << std::endl;

    // 2
    fs::path p2(p1);
    std::cout << "2. " << p2 << std::endl;

    // 3
    fs::path p3(std::move(p2));
    std::cout << "3. " << p3 << std::endl;

    // 4
    fs::path::string_type path4(__FILE__);
    fs::path p4(path4);
    std::cout << "4. " << p4 << std::endl;

    // 5
    const char* p = __FILE__;
    fs::path p5_c(p);
    std::cout << "5.c. " << p5_c << std::endl;

    std::string path5 = __FILE__;
    fs::path p5_0(path5);
    std::cout << "5.0. " << p5_0 << std::endl;

    fs::path p5_1(U"D:/猫.txt"); // UTF-32 string
    std::cout << "5.1. " << p5_1 << std::endl;

    fs::path p5_2(u8"~/狗.txt"); // UTF-8 string
    std::cout << "5.2. " << p5_2 << std::endl;

    // 6
    std::string path6 = __FILE__;
    fs::path p6(path6.begin(), path6.end());
    std::cout << "6. " << p6 << std::endl;

    // 7 8
    // macOS: NOT SUPPORTED

}

/*

path& operator=( const path& p );               (1)	(C++17 起)
path& operator=( path&& p ) noexcept;           (2)	(C++17 起)
path& operator=( string_type&& source );        (3)	(C++17 起)
template< class Source >
path& operator=( const Source& source );        (4)	(C++17 起)
--------------------------------------------------------------
path& assign( string_type&& source );           (1)	(C++17 起)
template< class Source >
path& assign( const Source& source );           (2)	(C++17 起)
template< class InputIt >
path& assign( InputIt first, InputIt last );    (3)	(C++17 起)

*/
void from_operator_assign() {
    // operator=

    // assign
}

int main() {
    // 
    from_construct();
    
    return 0;
}